package Problem;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

//
// Created by ✎﹏ℳ๓独赏☆独醉 on 2024/1/23.
// 
public class 字符数 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if(str.charAt(i) != ' '){
                count++;
            }
        }
        System.out.println(count);
    }
}
